Conversation
…r integration - Implemented `get_device_count` method in `GenTLCameraBackend` to retrieve the number of GenTL devices detected. - Added `max_devices` configuration option in `CameraSettings` to limit device probing. - Introduced `BoundingBoxSettings` for bounding box visualization, integrated into the main GUI. - Enhanced `DLCLiveProcessor` to accept a processor instance during configuration. - Updated GUI to support processor selection and auto-recording based on processor commands. - Refactored camera properties handling and removed deprecated advanced properties editor. - Improved error handling and logging for processor connections and recording states.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… options to config
- Update configuration settings to include support for single-animal models in DLCProcessorSettings. - Improve user guide with a link to DLC documentation for model export.
…le_animal in DLCLiveProcessor settings
- Implemented MultiCameraController to manage multiple cameras simultaneously.
…fix for basler backend
…me data without tiling and track source camera ID
…ulti-camera controller
Introduce a ModelType Literal type ("pytorch" | "tensorflow") and change DLCProcessorSettings.model_type from a plain str to this constrained type, keeping the default as "pytorch". This ensures pydantic validation enforces allowed model backends.
Set a static version (2.0.0rc1) in pyproject.toml and remove the dynamic setuptools configuration that read dlclivegui.__version__. Also remove the placeholder __version__ from dlclivegui/__init__.py so version metadata is centralized in pyproject.toml.
Introduce a cti_files_source marker (auto/user) and wiring to track whether CTI file lists were user-specified or auto-discovered. Treat legacy top-level properties.cti_file(s) as strict user overrides; treat properties.gentl.cti_file(s) as either an auto-cache (falls back to discovery if stale) or a user override depending on the marker. Persist the resolved source back into the namespace when resolving CTIs, and update harvester-selection/rebind logic to fall back to discovery when auto-cached CTIs are stale while still raising for strict user overrides. Also add a small import and internal field (_cti_files_source_used) to track the chosen source, plus logging when falling back from a stale auto-cache.
Add preflight checks, pattern validation and safer globbing for GenTL (.cti) discovery and loading. Renamed default CTI pattern constant to _LEGACY_DEFAULT_CTI_PATTERNS (Windows-only comment) and imported Path. Introduced _cti_preflight to detect missing/locked/permissioned files before Harvester.add_file and applied it where CTIs are loaded (skipping and logging problematic entries). Harden gentl_discovery with: redact-able diagnostics.summarize, _validate_glob_pattern, bounded _glob_limited, static-prefix checks, allowed-roots option and new discover_cti_files params (allow_globs, root_globs_allowed, max_glob_hits_per_pattern) to limit expensive scans. Also adjusted Harvester.update failure handling to treat update errors as discovery failures (return empty loaded list) and improved logging messages for discovery/load failures.
Introduce a single _expand_user_and_env() helper to consistently expand environment variables and '~', and use it across path normalization and glob validation. Update _normalize_path() to rely on the helper and Path handling, switch file existence checks to use a Path object, and add _dedup_key() to normalize deduplication on case-insensitive filesystems (Windows). Replace scattered os.path.expandvars/os.path.expanduser calls with the new helper for more predictable cross-platform behavior.
Adjust Harvester.update() error log string concatenation in gentl_backend.py to ensure proper spaces between message parts. Also remove an extraneous comment line from the gentl backend test to clean up test output.
Upgrade Gentl backend cti discovery
Pre-release cleanup for PySide6 GUI
Update dlclive requirement & add deploy workflow
Update the testing CI workflow to pass the CODECOV_TOKEN (secrets.CODECOV_TOKEN) to the Codecov action and set fail_ci_if_error to false so a failed upload won't break CI. Also add an inline note on the step name indicating the upload may need to be disabled if the token isn't configured.
Update .github/workflows/python-package.yml to trigger the pull_request workflow for branches [main, master] instead of [main, public]. This ensures PRs targeting the master branch will run the python-package CI workflow.
Add an Ubuntu-specific step to the python-package workflow to install Qt/OpenGL runtime dependencies (libegl1, libgl1, libopengl0, libxkbcommon-x11-0, libxcb-cursor0). This ensures CI runners have the required libraries for Qt/OpenGL-based install checks; the step runs apt-get update and installs the packages before the existing "Install tools" step.
This reverts commit 09a8364.
Simplify and reorganize the CI workflow: normalize tag pattern quoting and narrow pull_request branches/types. Add permissions.contents=read. Rename the main job to a test_matrix job that runs a Python matrix, streamline setup and pip installs, remove verbose cache steps (use setup-python cache option), and simplify build/twine checks and wheel smoke test (only imports the package; CLI smoke test removed). Add a separate build_release job (runs on tag pushes) to build distributions and upload them as artifacts. Update publish job to download artifacts, install twine, and upload to PyPI using non-interactive --skip-existing; make publish depend on build_release.
Split the workflow into validation and release paths and add clearer step names and safeguards. PRs against main/master now run a validation matrix (3.10, 3.11, 3.12) that builds the package, runs twine check, and smoke-tests installing the wheel; fail-fast is disabled to surface version-specific issues. Tag pushes matching v*.*.* trigger a canonical release build (single Python 3.12) that produces dist artifacts, uploads them as workflow artifacts, and a separate publish job downloads those artifacts and uploads them to PyPI. Other improvements: minimal permissions (contents: read), explicit checkout/setup steps, pip caching enabled, comments for clarity, and use of --skip-existing when uploading to PyPI.
Capture tox output to a file and append the coverage summary to the GitHub Actions job summary only for the ubuntu-latest / Python 3.12 matrix. Restrict Codecov uploads to that same matrix for PRs targeting main/master and point the upload at a per-environment coverage XML (coverage.py312.xml). Move coverage settings into tox.ini so tests generate env-specific .coverage files (COVERAGE_FILE) and XML reports ({toxinidir}/.coverage.{envname}.xml) for more reliable CI artifact handling.
Update GitHub Actions and tox/pyproject coverage settings so coverage output is picked up reliably. Read the tox output from tox-output.log and point the codecov action at ./.coverage.py312.xml. Stop excluding site-packages in pyproject (commented out) because it caused our installed package to be omitted from reports. Also tidy tox.ini coverage command formatting and ensure XML/term reports are emitted per envname.
Update tox.ini to set pytest --cov to {envsitepackagesdir}/dlclivegui instead of the project module name. This ensures coverage collects from the package installed into the tox environment (matching the GitHub Actions job) and avoids missing coverage when the package is not imported from the project root.
Replace the sed extraction with an awk script that starts printing at the coverage header and stops when the "Coverage XML written to file" marker is seen, preventing extraneous trailing output from being appended to the GitHub job summary. Retains the code block wrapping and || true to avoid step failures, and includes minor whitespace cleanup in the workflow file.
Select the built wheel dynamically and echo its path, install the package via a file:// wheel URL including the [pytorch] extras and add PyTorch CPU index to pip, replace the multi-line import check with a single python -c import verification, and run dlclivegui --help in offscreen Qt mode. These changes make the smoke test more robust by ensuring PyTorch dependencies are resolved and exercising the CLI in a headless environment.
|
Note : deploy workflow smoke tests failures should be fixed by #55; may require subsequent PRs |
|
I'll be stress-testing and reviewing changes today, with a focus on TensorFlow models. Like yourself, I cannot test all backends, but will look if I spot any vulnerabilities in the code. Good to have feedback from people that use it in an actual experimental setup. @C-Achard let me know if there are things that you'd like a second-opinion on, or if I can assist with anything specific. |
|
Thanks a lot @deruyter92 ! |
ba20dac to
fd605f8
Compare
Deploy workflow candidate for 2.0.0rc1
Update Codecov upload behavior in .github/workflows/testing-ci.yml to set fail_ci_if_error to false. This prevents the workflow from failing when the Codecov upload step encounters transient errors, ensuring CI jobs aren't blocked by Codecov availability or upload issues.
deruyter92
left a comment
There was a problem hiding this comment.
Left some comments. Overall, really clean code and when testing it, the GUI works fantastic for me.
Few general remarks:
- TensorFlow model worked out of the box for me!
- No reason to postpone beta-testing, but we might need to look at a clean solution for teardown in some places, when the thread did not exit cleanly. Setting shared fields to None could have side-effects (such as missing tails frames for JSON writing or hitting invalid states where _queue == None or _writer gone).
- A big applause for the user experience, I really think you did a great job in making the GUI very intuitive, flexible and giving it a very clean appearance!!
Approving it advance, to let you decide which ones you will address / ignore / or write down for later.
| ] | ||
| dependencies = [ | ||
| "cv2-enumerate-cameras", | ||
| "deeplabcut-live==1.1", |
There was a problem hiding this comment.
Shouldn't we allow for slightly decoupled development? In case we release a new version of DeepLabCut-live, we should keep it entirely backward compatible anyway.
| "deeplabcut-live==1.1", | |
| "deeplabcut-live>=1.1", |
Okay, most are addressed in #57 due to non-trivial changes and to help review. Thanks again ! |
Finalizing the PySide6+multi-camera GUI
Further refinement of GUI added in #35 by @arturoptophys
Remaining TODOs
Features
Improved settings UX/UIWorks as is, delayedMake processor socket design a bit safer by defaultAlso tweaks error handling, UI and UX.
Additional TODOs
see Create 2.0 documentation #39See Update docs TOC and Sphinx excludes DeepLabCut#3201Camera backends unit/smoke testRelated